﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<meta content="no-siteapp" http-equiv="Cache-Control">
<link media="handheld" rel="alternate">
<!-- end 云适配 -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>修改密码-拉勾网-最专业的互联网招聘平台</title>
<meta content="23635710066417756375" property="qc:admins">
<meta name="description" content="拉勾网是3W旗下的互联网领域垂直招聘网站,互联网职业机会尽在拉勾网">
<meta name="keywords"
      content="拉勾,拉勾网,拉勾招聘,拉钩, 拉钩网 ,互联网招聘,拉勾互联网招聘, 移动互联网招聘, 垂直互联网招聘, 微信招聘, 微博招聘, 拉勾官网, 拉勾百科,跳槽, 高薪职位, 互联网圈子, IT招聘, 职场招聘, 猎头招聘,O2O招聘, LBS招聘, 社交招聘, 校园招聘, 校招,社会招聘,社招">
<meta content="QIQ6KC1oZ6" name="baidu-site-verification">

<link href="h/images/favicon.ico" rel="Shortcut Icon">
<link href="/css/style.css" type="text/css" rel="stylesheet">
<link href="/css/external.min.css" type="text/css" rel="stylesheet">
<link href="/css/popup.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="/js/jquery.1.10.1.min.js"></script>
<script src="/js/jquery.lib.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
<script src="/js/additional-methods.js" type="text/javascript"></script>
<!--[if lte IE 8]>
<script type="text/javascript" src="/js/excanvas.js"></script>
<![endif]-->
<script src="/js/ajaxCross.json" charset="UTF-8"></script>
</head>
<body>
<div id="body">
    <div th:insert="~{header :: #header}"></div>
    <div id="container">
        <div class="user_bindSidebar">
            <dl id="user_sideBarmenu" class="user_sideBarmenu">
                <dt><h3>帐号设置</h3></dt>
                <dd><a class="hover" href="updatePwd.html">修改密码</a></dd>
            </dl>
        </div>
        <input type="hidden" id="hasSidebar" value="1">
        <div class="content user_modifyContent">
            <dl class="c_section">
                <dt>
                    <h2><em></em>修改密码</h2>
                </dt>
                <dd>
                    <form id="updatePswForm" onsubmit="return false">
                        <table class="savePassword">
                            <tbody>
                            <tr>
                                <td>登录邮箱：</td>
                                <td class="c7" th:text="${session.current_user.getEmail()}"></td>
                            </tr>
                            <tr>
                                <td class="label">当前密码：</td>
                                <td>
                                    <input type="password" maxlength="16" id="oldpassword" name="oldpassword">
                                    <span id="updatePwd_beError" style="display:none;" class="error"> </span>
                                </td>
                            </tr>
                            <tr>
                                <td class="label">新&nbsp;&nbsp;密&nbsp;码：</td>
                                <td>
                                    <input type="password" maxlength="16" id="newpassword" name="newpassword">
                                </td>
                            </tr>
                            <tr>
                                <td class="label">确认密码：</td>
                                <td>
                                    <input type="password" maxlength="16" id="comfirmpassword" name="comfirmpassword">
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><input type="submit" onclick="updatePassword()" value="保 存"></td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </dd>
            </dl>
        </div>
        <!-- 修改密码 -->
        <div style="overflow:hidden; display: none;" class="popup" id="updatePassword">
            <h3>修改密码成功，请重新登录</h3>
            <h4><span>5</span>秒后将自动退出</h4>
            <a class="btn" href="/user/logout.html">直接退出</a>
        </div>
    </div>
    <!------------------------------------- end ----------------------------------------->
    <script src="/js/setting.js"></script>
    <div class="clear"></div>
    <input type="hidden" value="" id="resubmitToken">
    <a rel="nofollow" title="回到顶部" id="backtop"></a>

</div><!-- end #body -->
<div id="footer">
    <div class="wrapper">
        <a rel="nofollow" target="_blank" href="h/about.html">联系我们</a>
        <a target="_blank" href="h/af/zhaopin.html">互联网公司导航</a>
        <a rel="nofollow" target="_blank" href="http://e.weibo.com/lagou720">拉勾微博</a>
        <a rel="nofollow" href="javascript:void(0)" class="footer_qr">拉勾微信<i></i></a>
        <div class="copyright">&copy;2013-2014 Lagou <a href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action" target="_blank">京ICP备14023790号-2</a></div>
    </div>
</div>

<script src="/js/core.min.js" type="text/javascript"></script>
<script src="/js/popup.min.js" type="text/javascript"></script>

<script type="text/javascript">
    function updatePassword() {
        // 发送请求
        $.ajax({
            url:'/user/updatePassword.html',
            data:$("#updatePswForm").serialize(),
            dataType:'JSON',
            type:'POST',
            success:function (result) {
                if (result.code == 2) {
                    $("#updatePassword").css('display', 'block');
                    $.colorbox({inline:true, href:$("#updatePassword"),title:"修改密码成功"});
                    setCountdown(4,'updatePassword h4 span', "/user/logout.html");
                } else {
                    $("#updatePwd_beError").text(result.msg).show();
                }
            }
        })
    }
    // 页面倒计时
    function setCountdown(time,id,url){
        var count = setTimeout(function(){$("#"+id).html(time);setCountdown(time-1,id,url)},1000);
        if(time==0){
            clearTimeout(count);
            top.location.href=url;
        }
    }
</script>
</body>
</html>